#pragma once

#include <functional>
#include <cstdint>

#include "../math/lighting.h"
#include "../math/collision.h"
#include "../math/ray.h"

#include "camera.h"
#include "scene.h"

namespace ray_tracing
{
	typedef std::function<vec3f(scene_t*, const ray3f& ray, uint32_t)> calculate_pixel_color_t;

	class point_kernel_t final
	{
	public:
		point_kernel_t(uint32_t* in_pixels, int in_width, int in_height,
			scene_t* in_scene, calculate_pixel_color_t in_shade);
		void operator()(int index) const;
	private:
		uint32_t* pixels;
		int width;
		int height;
		scene_t* scene;
		calculate_pixel_color_t shade;
		float inv_width;
		float inv_height;
		float ar;
	};
}